package route

import (
	"github.com/gin-gonic/gin"
	swaggerFiles "github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
	"shejiao/app/http/handle/user"
	_ "shejiao/docs" // 这里需要引入本地已生成文档
)

func InitRoute(c *gin.Engine) {

	c.Static("uploads", "./common/uploads")
	UserRoute(c)

	c.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
	c.POST("/common/callback/login", user.Common.CallbackLogin) // 登录回调

}
